<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: pico_stdio_uart</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.0.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__pico__stdio__uart.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">pico_stdio_uart<div class="ingroups"><a class="el" href="group__runtime.html">Runtime Infrastructure</a> &raquo; <a class="el" href="group__pico__stdio.html">pico_stdio</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Support for stdin/stdout using UART.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gafcc9bb58b1eb66b8571a507589f66fc2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__uart.html#gafcc9bb58b1eb66b8571a507589f66fc2">stdio_uart_init</a> (void)</td></tr>
<tr class="memdesc:gafcc9bb58b1eb66b8571a507589f66fc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Explicitly initialize stdin/stdout over UART and add it to the current set of stdin/stdout drivers.  <a href="group__pico__stdio__uart.html#gafcc9bb58b1eb66b8571a507589f66fc2">More...</a><br /></td></tr>
<tr class="separator:gafcc9bb58b1eb66b8571a507589f66fc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga265eeb67b5f1f4720dbe863e34d6acc4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__uart.html#ga265eeb67b5f1f4720dbe863e34d6acc4">stdout_uart_init</a> (void)</td></tr>
<tr class="memdesc:ga265eeb67b5f1f4720dbe863e34d6acc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Explicitly initialize stdout only (no stdin) over UART and add it to the current set of stdout drivers.  <a href="group__pico__stdio__uart.html#ga265eeb67b5f1f4720dbe863e34d6acc4">More...</a><br /></td></tr>
<tr class="separator:ga265eeb67b5f1f4720dbe863e34d6acc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga77fc28ecaf14439cdec18ac5a96d50f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__uart.html#ga77fc28ecaf14439cdec18ac5a96d50f4">stdin_uart_init</a> (void)</td></tr>
<tr class="memdesc:ga77fc28ecaf14439cdec18ac5a96d50f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Explicitly initialize stdin only (no stdout) over UART and add it to the current set of stdin drivers.  <a href="group__pico__stdio__uart.html#ga77fc28ecaf14439cdec18ac5a96d50f4">More...</a><br /></td></tr>
<tr class="separator:ga77fc28ecaf14439cdec18ac5a96d50f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2335d6c842d8363cf3df6b215f881919"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__uart.html#ga2335d6c842d8363cf3df6b215f881919">stdio_uart_init_full</a> (uart_inst_t *uart, uint baud_rate, int tx_pin, int rx_pin)</td></tr>
<tr class="memdesc:ga2335d6c842d8363cf3df6b215f881919"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform custom initialization initialize stdin/stdout over UART and add it to the current set of stdin/stdout drivers.  <a href="group__pico__stdio__uart.html#ga2335d6c842d8363cf3df6b215f881919">More...</a><br /></td></tr>
<tr class="separator:ga2335d6c842d8363cf3df6b215f881919"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3f1c7640efd0d3a9f60cf0581b3e5db3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__uart.html#ga3f1c7640efd0d3a9f60cf0581b3e5db3">stdio_uart_deinit</a> (void)</td></tr>
<tr class="memdesc:ga3f1c7640efd0d3a9f60cf0581b3e5db3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Explicitly deinitialize stdin/stdout over UART and remove it from the current set of stdin/stdout drivers.  <a href="group__pico__stdio__uart.html#ga3f1c7640efd0d3a9f60cf0581b3e5db3">More...</a><br /></td></tr>
<tr class="separator:ga3f1c7640efd0d3a9f60cf0581b3e5db3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c07c9747cd1f6cca963e9ab1b827745"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__uart.html#ga4c07c9747cd1f6cca963e9ab1b827745">stdout_uart_deinit</a> (void)</td></tr>
<tr class="memdesc:ga4c07c9747cd1f6cca963e9ab1b827745"><td class="mdescLeft">&#160;</td><td class="mdescRight">Explicitly deinitialize stdout only (no stdin) over UART and remove it from the current set of stdout drivers.  <a href="group__pico__stdio__uart.html#ga4c07c9747cd1f6cca963e9ab1b827745">More...</a><br /></td></tr>
<tr class="separator:ga4c07c9747cd1f6cca963e9ab1b827745"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga83ea2a4916972e370b2faff60895611f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__uart.html#ga83ea2a4916972e370b2faff60895611f">stdin_uart_deinit</a> (void)</td></tr>
<tr class="memdesc:ga83ea2a4916972e370b2faff60895611f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Explicitly deinitialize stdin only (no stdout) over UART and remove it from the current set of stdin drivers.  <a href="group__pico__stdio__uart.html#ga83ea2a4916972e370b2faff60895611f">More...</a><br /></td></tr>
<tr class="separator:ga83ea2a4916972e370b2faff60895611f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab4956585ad29fb33dd08924866209e31"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__stdio__uart.html#gab4956585ad29fb33dd08924866209e31">stdio_uart_deinit_full</a> (uart_inst_t *uart, int tx_pin, int rx_pin)</td></tr>
<tr class="memdesc:gab4956585ad29fb33dd08924866209e31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform custom deinitialization deinitialize stdin/stdout over UART and remove it from the current set of stdin/stdout drivers.  <a href="group__pico__stdio__uart.html#gab4956585ad29fb33dd08924866209e31">More...</a><br /></td></tr>
<tr class="separator:gab4956585ad29fb33dd08924866209e31"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >Support for stdin/stdout using UART. </p>
<p >Linking this library or calling <code>pico_enable_stdio_uart(TARGET ENABLED)</code> in the CMake (which achieves the same thing) will add UART to the drivers used for standard input/output </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga83ea2a4916972e370b2faff60895611f" name="ga83ea2a4916972e370b2faff60895611f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga83ea2a4916972e370b2faff60895611f">&#9670;&nbsp;</a></span>stdin_uart_deinit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void stdin_uart_deinit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Explicitly deinitialize stdin only (no stdout) over UART and remove it from the current set of stdin drivers. </p>
<p >This method disables PICO_DEFAULT_UART_RX_PIN for UART input (if defined), and leaves the pads isolated </p>

</div>
</div>
<a id="ga77fc28ecaf14439cdec18ac5a96d50f4" name="ga77fc28ecaf14439cdec18ac5a96d50f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga77fc28ecaf14439cdec18ac5a96d50f4">&#9670;&nbsp;</a></span>stdin_uart_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void stdin_uart_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Explicitly initialize stdin only (no stdout) over UART and add it to the current set of stdin drivers. </p>
<p >This method sets up PICO_DEFAULT_UART_RX_PIN for UART input (if defined) , and configures the baud rate as PICO_DEFAULT_UART_BAUD_RATE </p>

</div>
</div>
<a id="ga3f1c7640efd0d3a9f60cf0581b3e5db3" name="ga3f1c7640efd0d3a9f60cf0581b3e5db3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3f1c7640efd0d3a9f60cf0581b3e5db3">&#9670;&nbsp;</a></span>stdio_uart_deinit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void stdio_uart_deinit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Explicitly deinitialize stdin/stdout over UART and remove it from the current set of stdin/stdout drivers. </p>
<p >This method disables PICO_DEFAULT_UART_TX_PIN for UART output (if defined), PICO_DEFAULT_UART_RX_PIN for input (if defined) and leaves the pads isolated.</p>
<dl class="section note"><dt>Note</dt><dd>this method is automatically called by <a class="el" href="group__pico__stdio.html#gace6c31545f212bf181718f4fc7587ea7">stdio_deinit_all()</a> if <code>pico_stdio_uart</code> is included in the build </dd></dl>

</div>
</div>
<a id="gab4956585ad29fb33dd08924866209e31" name="gab4956585ad29fb33dd08924866209e31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab4956585ad29fb33dd08924866209e31">&#9670;&nbsp;</a></span>stdio_uart_deinit_full()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void stdio_uart_deinit_full </td>
          <td>(</td>
          <td class="paramtype">uart_inst_t *&#160;</td>
          <td class="paramname"><em>uart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>tx_pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rx_pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform custom deinitialization deinitialize stdin/stdout over UART and remove it from the current set of stdin/stdout drivers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uart</td><td>the uart instance to use, <a class="el" href="group__hardware__uart.html#ga4c45ff280c79aa60358d8241b7e5824b">uart0</a> or <a class="el" href="group__hardware__uart.html#gad94ac6d5e345a1f794174d9bb7c6f69c">uart1</a> </td></tr>
    <tr><td class="paramname">tx_pin</td><td>the UART pin to use for stdout (or -1 for no stdout) </td></tr>
    <tr><td class="paramname">rx_pin</td><td>the UART pin to use for stdin (or -1 for no stdin) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gafcc9bb58b1eb66b8571a507589f66fc2" name="gafcc9bb58b1eb66b8571a507589f66fc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafcc9bb58b1eb66b8571a507589f66fc2">&#9670;&nbsp;</a></span>stdio_uart_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void stdio_uart_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Explicitly initialize stdin/stdout over UART and add it to the current set of stdin/stdout drivers. </p>
<p >This method sets up PICO_DEFAULT_UART_TX_PIN for UART output (if defined), PICO_DEFAULT_UART_RX_PIN for input (if defined) and configures the baud rate as PICO_DEFAULT_UART_BAUD_RATE.</p>
<dl class="section note"><dt>Note</dt><dd>this method is automatically called by <a class="el" href="group__pico__stdio.html#ga0e604311fb226dae91ff4eb17a19d67a">stdio_init_all()</a> if <code>pico_stdio_uart</code> is included in the build </dd></dl>

</div>
</div>
<a id="ga2335d6c842d8363cf3df6b215f881919" name="ga2335d6c842d8363cf3df6b215f881919"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2335d6c842d8363cf3df6b215f881919">&#9670;&nbsp;</a></span>stdio_uart_init_full()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void stdio_uart_init_full </td>
          <td>(</td>
          <td class="paramtype">uart_inst_t *&#160;</td>
          <td class="paramname"><em>uart</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>baud_rate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>tx_pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rx_pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform custom initialization initialize stdin/stdout over UART and add it to the current set of stdin/stdout drivers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uart</td><td>the uart instance to use, <a class="el" href="group__hardware__uart.html#ga4c45ff280c79aa60358d8241b7e5824b">uart0</a> or <a class="el" href="group__hardware__uart.html#gad94ac6d5e345a1f794174d9bb7c6f69c">uart1</a> </td></tr>
    <tr><td class="paramname">baud_rate</td><td>the baud rate in Hz </td></tr>
    <tr><td class="paramname">tx_pin</td><td>the UART pin to use for stdout (or -1 for no stdout) </td></tr>
    <tr><td class="paramname">rx_pin</td><td>the UART pin to use for stdin (or -1 for no stdin) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga4c07c9747cd1f6cca963e9ab1b827745" name="ga4c07c9747cd1f6cca963e9ab1b827745"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4c07c9747cd1f6cca963e9ab1b827745">&#9670;&nbsp;</a></span>stdout_uart_deinit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void stdout_uart_deinit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Explicitly deinitialize stdout only (no stdin) over UART and remove it from the current set of stdout drivers. </p>
<p >This method disables PICO_DEFAULT_UART_TX_PIN for UART output (if defined), and leaves the pad isolated </p>

</div>
</div>
<a id="ga265eeb67b5f1f4720dbe863e34d6acc4" name="ga265eeb67b5f1f4720dbe863e34d6acc4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga265eeb67b5f1f4720dbe863e34d6acc4">&#9670;&nbsp;</a></span>stdout_uart_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void stdout_uart_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Explicitly initialize stdout only (no stdin) over UART and add it to the current set of stdout drivers. </p>
<p >This method sets up PICO_DEFAULT_UART_TX_PIN for UART output (if defined) , and configures the baud rate as PICO_DEFAULT_UART_BAUD_RATE </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>